// To parse this JSON data, do
//
//     final bankEntity = bankEntityFromJson(jsonString);

import 'dart:convert';

BankEntity bankEntityFromJson(String str) => BankEntity.fromJson(json.decode(str));

String bankEntityToJson(BankEntity data) => json.encode(data.toJson());

class BankEntity {
  int id;
  String banks;

  BankEntity({
    required this.id,
    required this.banks,
  });

  factory BankEntity.fromJson(Map<String, dynamic> json) => BankEntity(
    id: json["id"],
    banks: json["banks"],
  );

  Map<String, dynamic> toJson() => {
    "id": id,
    "banks": banks,
  };

  static List<Map> exchangeLabelList(List<BankEntity> entitys) {
    List<Map> list = [];
    for (BankEntity entity in entitys) {

      list.add({"label": entity.banks, "value": entity.id.toString()});
    }
    return list;
  }
}
